{% extends 'layout.html' %}
{% block content %}
    <div>
        <div class="container">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"> 新建用户 </h3>
                </div>
                <div class="panel-body">
                    <!--表单-->
                    <form method="post"><!--action可以不写，因为不写的话提交的是当前地址-->
                        {% csrf_token %}
                        <div class="form-group">
                            <label> 姓名 </label>
                            <input type="text" class="form-control" placeholder="姓名" name="name"/>
                            <label> 密码 </label>
                            <input type="text" class="form-control" placeholder="密码" name="pwd"/>
                            <label> 年龄 </label>
                            <input type="text" class="form-control" placeholder="年龄" name="age"/>
                            <label> 余额 </label>
                            <input type="text" class="form-control" placeholder="余额" name="acc"/>
                            <label> 入门时间 </label>
                            <input type="text" class="form-control" placeholder="时间" name="time"/>
                            <label> 性别 </label>
                            <select class="form-control" name="gen">
                                {% for item in gender_choice %}
                                    <option value="{{ item.0 }}">{{ item.1 }}</option>
                                {% endfor %}
                            </select>
                            <label> 部门ID </label>
                            <select class="form-control" name="depid">
                                {% for item in depart_list %}
                                    <option value="{{ item.id }}">{{ item.title }}</option>
                                {% endfor %}
                            </select>
                        </div>

                        <button type="submit" class="btn btn-primary"> 提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
